from numpy import *
#切片
arr = arange(15)
print(arr)
print(arr[8])
print(arr[8:])
print(arr[8:10])
arr[8:15] = 30
print(arr)

arr2 = arange(25).reshape(5,5)
print(arr2)
print(arr2[1,2:4])
print(arr2[1:3,2:4])
print(arr2[:,2:])
print(arr2[::2,2:])

arr3 = array([1,2,3,4,1,5,1])
print(arr3==1)